import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/components/Home'
import nav from '@/components/nav'
import index from '@/components/index'
import find from '@/components/find'
import text from '@/components/text'
import search from '@/components/search'
import echarts from '@/components/echarts'
import backend from '@/components/backend'
import user from '@/components/user'
import topic from '@/components/topic'
import literature from '@/components/literature'
import theme from '@/components/theme'
import lore from '@/components/lore'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Home',
      component: Home
    },
    {
      path: '/home',
      name: 'Home',
      component: Home
    },
    {
      path: '/nav',
      name: '',
      component: nav,
      children: [
        {
          path: '/',
          name: 'default',
          component: index
        },
        {
          path: '/index',
          name: 'index',
          component: index
        },
        {
          path: '/find',
          name: 'find',
          component: find
        },
        {
          path: '/text',
          name: 'text',
          component: text
        },
        {
          path: '/search',
          name: 'search',
          component: search
        },
        {
          path: '/echarts',
          name: 'echarts',
          component: echarts
        },
        {
          path: '/backend',
          name: 'backend',
          component: backend,
          children: [
            {
              path: '/',
              name: 'default',
              component: topic
            },
            {
              path: '/literature',
              name: 'literature',
              component: literature
            },
            {
              path: '/theme',
              name: 'theme',
              component: theme
            },
            {
              path: '/lore',
              name: 'lore',
              component: lore
            },
            {
              path: '/user',
              name: 'user',
              component: user
            }
          ]
        }
      ]
    }
  ]
})
